package com.ershi.spring.ioc.lifecycle;

import org.springframework.context.SmartLifecycle;

/**
 * @author 二十
 * @since 2021/10/12 12:18 上午
 */
public class DemoSmartLifeCycle implements SmartLifecycle {

	private boolean running = false;
	@Override
	public void start() {
		this.running=true;
		System.out.println("demo two start!");
	}

	@Override
	public void stop() {
		this.running=false;
		System.out.println("demo two stop!");
	}

	@Override
	public boolean isRunning() {
		return running;
	}
}
